import request from '@/utils/request'

export function getByParent(data) {
  return request({
    url: 'api/caType/byParent',
    method: 'post',
    data
  })
}

// 新增分类

export function addOrSave(data) {
  return request({
    url: 'api/caType/addOrSave',
    method: 'post',
    data
  })
}

// 新增或修改资产类型
export function caAddOrSave(data) {
  return request({
    url: '/api/ca/addOrSave',
    method: 'post',
    data
  })
}

// 删除资产类型
export function delcaType(data) {
  return request({
    url: '/api/caType',
    method: 'DELETE',
    data
  })
}

// 删除折旧
export function delectZhejiu(data) {
  return request({
    url: '/api/caDiscountHis',
    method: 'DELETE',
    data
  })
}

// 删除变卖
export function delectBianmai(data) {
  return request({
    url: '/api/caSale',
    method: 'DELETE',
    data
  })
}
// 银行账户
export function basBank(data) {
  return request({
    url: '/api/basBank',
    method: 'get',
    data
  })
}

// 资产
export function getzican(data) {
  return request({
    url: 'api/ca',
    method: 'get',
    data
  })
}
// 资产
export function delect(data) {
  return request({
    url: 'api/ca',
    method: 'DELETE',
    data
  })
}
// 资产启用
export function enableChange(data) {
  return request({
    url: '/api/ca/enableChange',
    method: 'post',
    data
  })
}
// 查询固定资产变卖
export function caSale(data) {
  return request({
    url: '/api/caSale',
    method: 'get',
    data
  })
}

// 新增或修改固定资产变卖
export function addcaSale(data) {
  return request({
    url: '/api/caSale/addOrSave',
    method: 'post',
    data
  })
}

//  查询固定资产折扣
export function caDiscountHis(data) {
  return request({
    url: '/api/caDiscountHis',
    method: 'get',
    data
  })
}

//  新增或修改固定资产折扣
export function addcaDiscountHis(data) {
  return request({
    url: '/api/caDiscountHis/addOrSave',
    method: 'post',
    data
  })
}

//  获取科目
export function basSubject(data) {
  return request({
    url: 'api/basSubject',
    method: 'get',
    data
  })
}

export default { getByParent, addOrSave }
